# This example has been taken from a book "Practical programming in Tcl and Tk"
# 4th edition, by Brent B. Welch
#
# Part 1: Tcl Basics
# Chapter 1. Tcl fundamentals
# Example 1-12 Defining a procedure

proc Diag {a b} {
    set c [expr {sqrt($a * $a + $b * $b)}]
    return $c
}
puts stdout "The diagonal of a 3, 4 right triangle is [Diag 3 4]"
# => The diagonal of a 3, 4 right triangle is 5.0